package com.factory.abstractfactory.demo1;


import com.factory.abstractfactory.demo1.extend.PC;

public class Client {
    public static void main(String[] args){
        AbstractFactory factory = new MiFactory();
        Phone miPhone = factory.createPhone();
        miPhone.call();
        miPhone.msm();
        // 扩展PC业务
        PC miPC = factory.createPC();
        miPC.network();

        factory = new MacFactory();
        Phone macPhone = factory.createPhone();
        macPhone.call();
        macPhone.msm();
        // 扩展PC业务
        PC macPC = factory.createPC();
        macPC.network();
    }
}
